#ifndef _FILE_LOG_HANDLER_H
#define _FILE_LOG_HANDLER_H

enum LogType
{
	LOG_PACKETS		= 0x00,
	LOG_OBJECT		= 0x01,
	LOG_GM			= 0x02,
	LOG_ERROR		= 0x03,
};

class DLL_EXPORT FileLogHandler : public Single<FileLogHandler>
{
	struct FileInfo
	{
		FILE* fileptr;
		Mutex filemutex;
	};
	stdext::hash_map<LogType, FileInfo*> m_filelogs;
public:
	bool AddLogFile(LogType type, const char* filename);
	void WriteToLog(LogType type, const char* title, const char* text, ...);
};

#define FileLog (*(FileLogHandler::getSingle()))

#endif